package cn.lili.controller.feign;

import cn.lili.modules.permission.client.PermissionClient;
import cn.lili.modules.permission.entity.vo.UserMenuVO;
import cn.lili.modules.permission.service.RoleMenuService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * PermissionFeignController
 *
 * @author Chopper
 * @version v1.0
 * 2022-09-02 16:29
 */
@RestController
@RequiredArgsConstructor
public class PermissionFeignController implements PermissionClient {

    private final RoleMenuService roleMenuService;

    @Override
    public List<UserMenuVO> getUserPermission(String userId) {
        return roleMenuService.findAllMenu(userId);
    }
}
